<?php
/**
 * LBN Payment Gateway Online Payment PHP Demo
 * @author langs
 * @version demo
 */
 

require_once("config.php");
require_once("lib/notify.class.php");

$Notify = new Notify($config);
$verify_result = $Notify->verifyReturn();
if($verify_result) {//verify succeed
    if($_POST["respCode"] != "00") {
    	$msg = $_POST["respMsg"];
    } elseif ($_POST['status'] == '1') {
    	//payment succeed
    	//place ur code here
    	$msg = '支付成功';
    }elseif($_POST['status'] == '0'){
    	//payment processing
    	//place ur code here
    	$msg = '支付处理中';
    }elseif($_POST['status'] == '2'){
    	//payment failure
    	//place ur code here
    	$msg = '支付失败';  	
    }else{
    	$msg = $_POST["respMsg"];
    }
}else {
    //signature failure
    //place ur code here
	$msg =  "验签失败";
}
//defined layout
$layout = realpath('views/layouts/2columns.php');
$content = realpath('views/return.php');
//include output template
include_once 'views/layouts/main.php';